from .client import CommonClient
from .client import ApiClient
from ..utils.url_params import OpenApiUrlParams

"""
CorpClient
企业用户帐号管理
"""


class CorpClient(ApiClient):
    # 添加企业用户
    def add(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.CORP_ADD, data)

    # 更新企业用户
    def update(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.CORP_UPDATE, data)

    # 删除企业用户
    def delete(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.CORP_DELETE, data)

    # 禁用企业用户
    def disable(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.CORP_DISABLE, data)

    # 恢复企业用户
    def enable(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.CORP_ENABLE, data)

    # 解绑企业用户账号
    def unbind(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.CORP_UNBIND, data)

    # 获取企业用户授权链接
    def get_auth_url(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.CORP_GET_AUTH_URL, data)

    # 查询企业用户基本信息
    def get_detail(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.CORP_GET_DETAIL, data)

    # 获取企业用户身份信息
    def get_identity_info(self, data):
        return CommonClient.post_json(self, OpenApiUrlParams.CORP_GET_IDENTITY_INFO, data)

